package com.team.kaidb.act;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.team.kaidb.BaseActivity;
import com.team.kaidb.R;
import com.team.kaidb.customview.KeyBoardView;

import butterknife.InjectView;
import butterknife.OnClick;

/**
 * 首页
 */
public class ActivityHome extends BaseActivity {

    @InjectView(R.id.textView_menu1)
    TextView tv_menu1;
    @InjectView(R.id.textView_menu2)
    TextView tv_menu2;
    @InjectView(R.id.textView_menu3)
    TextView tv_menu3;
    @InjectView(R.id.linearLayout_menu)
    LinearLayout linearLayout_menu;

    private KeyBoardView keyBoardView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        keyBoardView = new KeyBoardView(this);
        keyBoardView.initViews(1);
    }

    @Override
    protected void onResume() {
        super.onResume();
        linearLayout_menu.setVisibility(View.INVISIBLE);
    }

    @Override
    public int getLayoutId() {
        return R.layout.act_home_lay;
    }

    @OnClick({R.id.textView_menu1,R.id.textView_menu2,R.id.textView_menu3,R.id.imageView_menu_img})
    void menuSelect(View view){
        switch (view.getId()){
            case R.id.imageView_menu_img:
                linearLayout_menu.setVisibility(linearLayout_menu.getVisibility() == View.INVISIBLE?View.VISIBLE:View.INVISIBLE);
                break;
            case R.id.textView_menu1:
                startActivity(new Intent(context,ActivityMemPay.class));
                break;
            case R.id.textView_menu2:
                startActivity(new Intent(context,ActivityCancelPay.class));
                break;
            case R.id.textView_menu3:
                startActivity(new Intent(context,ActivityModPass.class));
                break;
            default:
                break;
        }
    }


}
